import myaxios from "../MyAxios";
// 引入路径前缀
import BASE from "../BaseUrl";
const {
  MACURL
} = BASE;

const makeupApi = {
  /**
   * 修改
   */
  update(params) {
    return myaxios.post(MACURL + "/makeup/put", params);
  },

  /**
   * 添加
   */
  add(params) {
    return myaxios.post(MACURL + "/makeup/add", params);
  },

  /**
   * id查询
   */
  queryById(params) {
    return myaxios.get(MACURL + "/makeup/query", params);
  },

  /**
   * 通过name 模糊查询
   */
  queryAllByName(params) {
    return myaxios.post(MACURL + "/makeup/title", params);
  },

  /**
   * 删除产品列表对应的ID
   * @params {Object} params {adi: 产品ID}
   */
  delete(params) {
    return myaxios.post(MACURL + "/makeup/del", params)
  },

  /**
   * 查询所有产品
   * @param {Object} params
   */
  queryByleixing(params) {
    return myaxios.get(MACURL + "/makeup", params);
  },
};

export default makeupApi;